Skip to content

Conversation

@jrmoserbaltimore
Copy link

The Dockerfiles are right, but I have no idea about the update scripts. I tried.

This is for php-fpm. To launch this, you'd run two containers:

  • drupal:fpm
  • nginx

Your nginx would use fastcgi calls back to the php-fpm container, either by a link and a fastcgi call to tcp/9000 or by using volumes_from in docker-compose.yml and configuring php-fpm to put a socket file on a volume.

nginx tends to only eat about 2.5 megabytes per process. I originally did this to deal with Apache eating 6 gigabytes on a busy web server, instead having a 30-100 megabyte php-fpm process and 10 megabytes of nginx workers. That was an extremely loaded server.

As well, when running multiple applications, it's frequently useful to have a separate, non-aware nginx with a conf.d full of virtual hosts using proxy_pass directives to sockets on a shared volume. That allows you to run things like Drupal, OwnCloud, and Wordpress via separate compose files and databases, exposing each via a socket file; if you down one of the services, the rest work, while nginx gives "bad gateway" if you try to access the downed one. To do this over TCP, the nginx container must be started after and explicitly linked with the application container, which means one big compose file and repeatedly bringing down all applications whenever adding a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant